package com.zlay.javafx.examples.common;

import java.io.File;
import java.io.IOException;
import java.util.Map;

import org.apache.log4j.Logger;

public class ExConfigUtils {
	
	private static Logger logger = Logger.getLogger(ExConfigUtils.class);
	
	private static Map<String, Object> conf = null;
	
	private static Map<String, Object> getConf() {
		if(conf==null) {
			try {
				conf = ExJsonUtils.readJsonFile(new File("").getCanonicalPath() + "/conf/conf.json");
			} catch (IOException e) {
				logger.error("get conf.json error!");
			}
		}
		return conf;
	}
	
	public static String getLocal() {
		return (String) getConf().get("language");
	}
}
